import java.util.*;
import java.io.*;

public class Main
{
    public static PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
    public static Read in = new Read();

//链接：https://ac.nowcoder.com/acm/problem/221681
//来源：牛客网

    public static void main(String[] args) throws IOException
    {
//        int n=in.nextInt();
//        int x=in.nextInt();
//        int[] arr=new int[n+1];
//        for(int i=1;i<=n;i++){
//            arr[i]=in.nextInt();
//        }
//        int left=1,right=1,resLeft=-1,resRight=-1,resLen=n;
//        int sum=0;
//        while(right<=n){
//            sum+=arr[right];
//            while(sum>=x){
//                if(right-left+1<resLen){
//                    resLeft=left;
//                    resRight=right;
//                    resLen=right-left+1;
//                }
//                sum-=arr[left++];
//            }
//            right++;
//        }
//        out.println(resLeft+" "+resRight);
        int n=in.nextInt();
        int x=in.nextInt();
        int[] arr=new int[n+1];
        for(int i=1;i<=n;i++){
            arr[i]=in.nextInt();
        }
        int left=1,right=1;
        int sum=0;
        for(right=1;right<=n;right++){
            sum+=arr[right];
            if(sum>=x){
                break;
            }
        }
        for(left=1;left<=right;left++){
            sum-=arr[left];
            if(sum<x){
                break;
            }
        }
        out.println(left+" "+right);
        out.close();
    }
}


class Read // 自定义快速读入
{
    StringTokenizer st = new StringTokenizer("");
    BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
    String next() throws IOException
    {
        while(!st.hasMoreTokens())
        {
            st = new StringTokenizer(bf.readLine());
        }
        return st.nextToken();
    }

    String nextLine() throws IOException
    {
        return bf.readLine();
    }

    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
}